Configures accelerometer to generate an interrupt when motion is detected. More...
#include "../HAL/hal_cc2530znp_target_board.h"#include "msp430x22x4.h"#include <stdarg.h>|
| |
| void(* | accelerometerIsr )(void) |
| void | handleAccelerometer () |
| int | main (void) |
Configures accelerometer to generate an interrupt when motion is detected.
Configures accelerometer to be in motion detect mode with default threshold & time settings to interrupt the MSP430 upon detection of motion. Displays the cause of the motion interrupt (X-axis, Y-axis, or Z-axis). Uses the Hardware Abstraction Layer (hal) to access the accelerometer. Configures Accelerometer with the following settings:
YOU ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
| void handleAccelerometer | ( | ) |
Our Interrupt Service Routine (ISR) for Accelerometer Interrupt
Accelerometer interrupt service routine.
accelerometerIsr = halEnableAccelerometerInterrupt(NO_WAKEUP); Handles Accelerometer interrupt
| void(* accelerometerIsr)(void) |
Function pointer points to the function that will be called upon Accelerator Interrupt
1.6.3